

<div class="pageContent">
	<form method="post" action="<?=$this->uri->uri_string()?>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
	<input value="ok" name="submit" type="hidden"/>
		<div class="pageFormContent" layoutH="56">
			<dl>
				<dt>菜谱名：</dt>
				<dd><input class="required" value="<?=$caipu_info['title']?>" name="title" type="text" size="30" /></dd>
			</dl>
			<dl>
				<dt>状态：</dt>
				<dd>
					<input type="radio" name="status" value="1" <?php if ($caipu_info['status'] == 1){echo 'checked';}?> />推荐
					<input type="radio" name="status" value="0" <?php if ($caipu_info['status'] == 0){echo 'checked';}?> />显示 
					<input type="radio" name="status" value="2" <?php if ($caipu_info['status'] == 2){echo 'checked';}?> />隐藏
				</dd>
			</dl>
			<dl>
				<dt>所需时长：</dt>
				<dd>
					<select name="costtime" class="required combox">
					<option value="">请选择</option>
					<option value="10分钟左右" <?php if ($caipu_info['costtime'] == '10分钟左右'){echo 'selected';}?> >10分钟左右</option>
					<option value="30分钟左右" <?php if ($caipu_info['costtime'] == '30分钟左右'){echo 'selected';}?> >30分钟左右</option>
					<option value="1小时左右" <?php if ($caipu_info['costtime'] == '1小时左右'){echo 'selected';}?> >1小时左右</option>
					<option value="1小时以上"  <?php if ($caipu_info['costtime'] == '1小时以上'){echo 'selected';}?> >1小时以上</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>份量：</dt>
				<dd>
					<select name="deal" class="required combox">
					<option value="">请选择</option>
					<option value="1" <?php if ($caipu_info['deal'] == 1){echo 'selected';}?> >1人</option>
					<option value="2" <?php if ($caipu_info['deal'] == 2){echo 'selected';}?> >2人</option>
					<option value="3" <?php if ($caipu_info['deal'] == 3){echo 'selected';}?> >3人</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>归类：</dt>
				<dd><input placeholder="菜谱归类,关键字 逗号隔开" value="<?=$caipu_info['class_name']?>" name="class_name" type="text" size="30" /></dd>
			</dl>
			<dl class="nowrap">
				<dt>图片：</dt>
				<dd>
					<input class="required" readonly="readonly" value="<?=$caipu_info['coverImage']?>" name="coverImage.fileName" type="text" size="60" />
					<a class="btnAttach" href="<?=site_url('manage/admin_update/index/caipu_new')?>" lookupGroup="coverImage" width="560" height="200" title="附件">附件</a>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>用料：</dt>
				<dd>
					<table class="list nowrap itemDetail" addButton="新建" width="100%">
						<thead>
							<tr>
								<th type="text" name="materials[str][]" size="12" fieldClass="required">食材</th>
								<th type="text" name="materials[int][]" size="12" fieldClass="required">用量</th>
								<th type="del" width="60">操作</th>
							</tr>
						</thead>
						<tbody>
							<?php $materials_array = explode('|',$caipu_info['materials']);?>
							<?php foreach( $materials_array as $materials_array2) :?>
							<?php $materials = explode('，',$materials_array2);?>
							<tr class="unitBox">
								<td><input type="text" name="materials[str][]" value="<?=@$materials[0]?>" size="12" class="required textInput valid"></td>
								<td><input type="text" name="materials[int][]" value="<?=@$materials[1]?>" size="12" class="textInput"></td>
								<td><a href="javascript:void(0)" class="btnDel ">删除</a></td>
							</tr>
							<?php endforeach?>
						</tbody>
					</table>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>操作步骤：</dt>
				<dd>
					<table class="list nowrap itemDetail" addButton="新建" width="100%">
						<thead>
							<tr>
								<th type="text" name="setpInfos[str][]" size="60" fieldClass="required">步骤说明</th>
								<th type="text" name="setpInfos[pic][]" size="15" fieldClass="required">步骤图</th>
								<th type="del" width="50">操作</th>
							</tr>
						</thead>
						<tbody>
							<?php $index = 0;?>
							<?php $setpInfos_array = explode('|',$caipu_info['setpInfos']);?>
							<?php foreach( $setpInfos_array as $setpInfos) :?>
							<tr class="unitBox">
								<td><?=$index+1?><input type="text" name="setpInfos[str][]" value="<?=@$setpInfos?>" size="60" class="required textInput valid"></td>
								<td><input type="text" name="setpInfos[pic][]" value="<?=@$caipu_setppic[$index]['location']?>" size="15" class="textInput"></td>
								<td><a href="javascript:void(0)" class="btnDel ">删除</a></td>
							</tr>
							<?php ++$index;?>
							<?php endforeach?>
						</tbody>
					</table>
				</dd>
			</dl>
			<div class="divider"></div>
			<dl>
				<dt>修改时间：</dt>
				<dd><input type="text" name="time" value="<?=$caipu_info['time']?>" class="date" dateFmt="yyyy-MM-dd HH:mm" readonly="true"/>
				<a class="inputDateButton" href="javascript:;">选择</a></dd>
			</dl>
			<dl>
				<dt>浏览量：</dt>
				<dd><input class="required" value="<?=$caipu_info['views']?>" name="views" type="text" size="10" /></dd>
			</dl>

			<dl class="nowrap">
				<dt>菜谱介绍：</dt>
				<dd><textarea cols="75" rows="5" name="infos"><?=$caipu_info['infos']?></textarea></dd>
			</dl>
			<dl class="nowrap">
				<dt>小技巧：</dt>
				<dd><textarea cols="75" rows="5" name="tips"><?=$caipu_info['tips']?></textarea></dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>